/**
 * @file   1128.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Wed Jul  7 01:33:37 2021
 * 
 * @brief  PAT advanced 1128
 * 
 * 
 */
#include<iostream>
#include<cmath>
#include<vector>
#include<map>
using namespace std;
int main(){
    int linenum;
    cin>>linenum;
    for(int i=0;i<linenum;i++){
	bool flag=true;
	vector<int> pos;
	int d;
	cin>>d;
	for(int j=0;j<d;j++){
	    int n;
	    cin>>n;
	    pos.push_back(n);
	}
	for(int j=0;j<d;j++){
	    for(int k=j+1;k<d;k++){
		if(abs(pos[k]-pos[j])==k-j||abs(pos[k]-pos[j])==0){
		    flag=false;
		    break;
		}
	    }
	    if(flag==false){
		break;
	    }
	}
	if(flag){
	    cout<<"YES"<<endl;
	}else{
	    cout<<"NO"<<endl;
	}
    }
}
